set TMPL_ENCODING=" "
Online documentation - WebsydianExpress v3.5 |
The TemplateGen.cmd file is a Windows batch script file and is used to execute the Websydian Template Generator. Normally this script file is called by the _CreateTemplates function when running it from within your Plex IDE.
The information of this document should enable you to customize the process if you would like to do so.
The full path + file name of the XML template.
The path to the base mete template folder. This is folder must contain a subfolder for each page type you want to be able to handle.
This corresponds to the MetaTemplatePath setting in the websydian.ini/.prop file.
The path to the folder where the generated templates should be saved.
This corresponds to the GeneratedTemplatePath setting in the websydian.ini/.prop file.
A Y/N flag that controls whether the template generation should write debug information to the generated templates.
The cmd file receives the parameters specified above - mostly this information are determined by the ini/property file settings.
In addition to these settings, there are certain things you can define in the TemplateGen.cmd file itself.
This setting determines the encoding the generated templates will be saved in.
set TMPL_ENCODING=" "
set TMPL_ENCODING="utf-8"
Currently this is instructs the template conversion functions to not delete temporary files. As we identify more information that might be relevant to show/store in a debugging situation, this setting will also be used to determine whether this information should be available.
Change the value to "Y" to run the conversion in verbose mode.
set VERBOSE="N"
set VERBOSE="Y"
This sets up the package list used to determine the package information for the ChildPageGenerators called when the meta template contains %INCLUDE statements.
The list must always contain com.websydian.template.
If you create your own conversion PageGenerators in another package, this must be added to the package list.
The delimiter used in the list is semi-colon: ";".
set GEN_PACKAGE_LIST=com.websydian.template
set GEN_PACKAGE_LIST=com.websydian.template;com.mydomain.mypackagename
As the main conversion function is a Plex generated Java application, the cmd file has to set up the classpath for the Java call, identify the location of the java.exe to run and perform the call.
The folder containing the cmd file must contain a folder named jars. All jar files contained in this folder will be included in the classpath for the java call.
This is done by reading the JAVA_HOME environment variable.
If the folder that contains the cmd file also contains a file named "TemplateGenPreProcess.cmd", it will be called before the conversion functions are called
If the folder that contains the cmd file also contains a file named "TemplateGenPostProcess.cmd", it will be called after the conversion functions are called